% autoFitCol - Auto fit the columns width
% Notes:
%      if columns range is not designated, handle the activated columns in
%      sheet.

% Auth/Revision: Ouyang Wei
%                $Id: autoFitCol.m 1353 2016-05-24 15:42:43Z weio $:
%                Copyright 2014, The MathWorks Inc.

function addDataValidationToUnit(obj,sheet,unit,DataList)
% SheetName='Sheet1';
% Unit='H5';
% DataList={'a','b','c'};
DataRange = obj.getDataRangeInternal(sheet, unit);
DataValidationStr=strjoin(DataList,',');
% DataValidationStr=['"' DataValidationStr '"'];
DataRange.Validation.Add('xlValidateList',1,1,DataValidationStr);
end